<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title></title>
    <link href="/resource/css/bootstrap.css" rel="stylesheet">
    <script type="text/javascript" src="/resource/js/jquery-3.2.1.js"></script>
    <script type="text/javascript" src="/resource/My97DatePicker/WdatePicker.js"></script>
</head>
<body>
     <form method="post" action="list">
         外发单号:<input type="text" name="waifaid" value="${a.waifaid}" >
         类型:<select name="lx">
                 <option value="">请选择</option>
                 <option value="0">工号查询</option>
                 <option value="1">姓名查询</option>
             </select>
         内容:<input type="text" name="neirong" value="${a.neirong}">
         外发日期:<input type="date" name="mintime" value='<fmt:formatDate value="${a.mintime}" pattern="yyyy-MM-dd"></fmt:formatDate>'>-
         <input type="date" name="maxtime" value='<fmt:formatDate value="${a.maxtime}" pattern="yyyy-MM-dd"></fmt:formatDate>'>
         <input type="hidden" name="pageNum">
         <input type="submit" value="搜索">
         <br>
         <table class="table">
             <tr>
                 <th>外发日期</th>
                 <th>外发单号</th>
                 <th>工号</th>
                 <th>姓名</th>
                 <th>商品编号</th>
                 <th>商品名称</th>
                 <th>型号</th>
                 <th>规格</th>
                 <th>单价</th>
                 <th>数量</th>
                 <th>金额</th>
                 <th>备注</th>
                 <th>操作</th>
             </tr>
             <c:forEach items="${info.list}" var="e">
                 <tr>
                     <td><fmt:formatDate value="${e.waifatime}" pattern="yyyy-MM-dd"></fmt:formatDate> </td>
                     <td>${e.waifaid}</td>
                     <td>${e.empid}</td>
                     <td>${e.empname}</td>
                     <td>${e.shopid}</td>
                     <td>${e.shopname}</td>
                     <td>${e.xinghao}</td>
                     <td>${e.guige}</td>
                     <td>${e.price}</td>
                     <td>${e.num}</td>
                     <td>${e.jine}</td>
                     <td>${e.beizhu}</td>
                     <td>
                         <a href="selectAddtable?waifaid=${e.waifaid}"><input type="button" value="修改"></a>
                         <input type="button" value="删除">
                     </td>
                 </tr>
             </c:forEach>
             <tr>
                 <td colspan="13">
                     <jsp:include page="/resource/page/pages.jsp"></jsp:include>
                 </td>
             </tr>
         </table>
     </form>
<script>
    $("[name='lx']").val('${a.lx}')
    function goPage(pageNum){
        $("[name=pageNum]").val(pageNum);
        $("form").submit();
    }

</script>
</body>


</html>